home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / TwinOpus2 / REXX / DOpus / EnterDir.rexx < prev    next >
OS/2 REXX Batch file  |  1994-10-13  |  1KB  |  54 lines

  1. /*
  2.  *
  3.  * Enter the selected directory in TwinExpres from DOpus.
  4.  *
  5.  * (c) 1994 by K.P. van Beem (2:280/464.2, patrick.van.beem@aobh.xs4all.nl)
  6.  *
  7.  * Based on the DOpusLhaARexx package by Geoff Seeley (but you can better
  8.  * use GuiArc in stead of DOpus and a script, to deal with archives)
  9.  *
  10.  */
  11.  
  12.  
  13. DOpusPort   = 'DOPUS.1'
  14.  
  15. if ~show(l,"rexxsupport.library") then        
  16.     call addlib("rexxsupport.library",0,-30,0)
  17. if showlist('Ports', DOpusPort) = 0 then do
  18.    say 'Directory Opus Arexx port not found. Aborting.'
  19.    exit
  20. end
  21.  
  22. address 'DOPUS.1'
  23. options results
  24.  
  25. /* setup DOpus window and tell user what's happening */
  26. Busy on
  27. TopText "Getting directory of CD, please wait..."
  28.  
  29.  
  30. /* Get the next directory */
  31. 'Status 6 -1'
  32. GetEntry Result
  33. FilePath = Result
  34. if left(FilePath,1) ~= '*' then do
  35.    TopText "You are not in a 'Twin' directory."
  36.    Busy off
  37.    exit
  38. end
  39. FilePath = SubStr(FilePath,2)
  40. 'GetNextSelected -1'
  41. Directory=Result
  42. if SubStr(Directory,26,9) ~= "Directory" then do
  43.    TopText "Selected item is no directory."
  44.    Busy off
  45.    exit
  46. end
  47. if right(FilePath,1) = ':' then
  48.    FilePath = FilePath || Strip(left(Directory,25))
  49. else
  50.    FilePath = FilePath || '/' || Strip(left(Directory,25))
  51.  
  52. address AREXX "Rexx:DOpus/ReadDir.rexx" FilePath
  53.  
  54.